/**
 * Element原生组件重定义
 * 包含单组件不能通过变量修改的部分
 * 以及组件嵌套使用时的定义
 */

@import "./element-variables.scss";

.el-tag {
  border-width: 0;
}

.el-dialog {
  position: relative;
  top: 50%;
  left: 0;
  margin: 0 auto !important;
  transform: translateY(-50%);
  &__header{
    height: 48px;
    padding: 0 24px;
    line-height: 48px;
    border-bottom: 1px solid $--border-color-base;
  }
  &__headerbtn{
    top: 15px;
    right: 24px;
  }
  &__title{
    font-size: 16px;
    font-weight: bold;
    color: $--color-text-primary;
  }
  &__body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 24px;
  }
  &__footer{
    height: 64px;
    line-height: 64px;
    padding: 0 24px;
    border-top: 1px solid $--border-color-base;
  }
}

.el-table {
  tr td:first-child,
  th:first-child {
    & > .cell {
      padding-left: 30px;
    }
  }
  tr td:last-child,
  th:last-child {
    & > .cell {
      padding-right: 30px;
    }
  }
  th, td {
    height: 56px;
  }
  td{
    & > .cell {
      .vehicleModelTag{
        display: block;
        max-width: 100%;
        &:not(:first-child){
          padding-top: 5px;
        }
      }
      .el-tag {
        max-width: 100%;
        vertical-align: middle;
        margin-right: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
  .el-table__fixed-right{
    .el-table__fixed-body-wrapper{
      tr td:first-child > .cell{
        padding-left: 10px;
      }
    }
  }
}

.el-pagination {
  font-weight: normal;
  &.is-background {
    .btn-prev,
    .btn-next,
    .el-pager li {
      color: $--color-text-secondary;
      border-radius: 4px;
      background-color: transparent;
    }
    .el-pager li {
      border: 1px solid $--border-color-base;
      &:not(.disabled).active {
        border-color: $--color-primary
      }
    }
  }
}

.el-drawer{
  &__header {
    height: 48px;
    margin-bottom: 0;
    padding: 0 14px 0 24px;
    padding-bottom: 0;
    border-bottom: 1px solid $--border-color-base;
    font-size: 16px;
    font-weight: bold;
    color: $--color-text-primary;
  }

  // 嵌套定义
  .el-form--label-top {
    .el-form-item {
      margin-bottom: 16px;
      .el-form-item__label{
        line-height: 30px;
        margin-bottom: 5px;
        padding: 0;
      }
    }
  }
}

.el-card{
  &__header {
    min-height: 40px;
    padding: 14px 15px 7px;
  }
  &__body {
    padding: 15px 20px 20px 20px;
  }
}

.el-cascader{
  .el-cascader__tags {
    .el-cascader__search-input{
      margin-left:10px;
    }
    right:1px;
    max-height:70px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 40px;
  }
  &-menu {
    &__list {
      max-width: 350px;
    }
    &__wrap {
      height: 304px;
    }
  }
}

.el-tree-node__content > .el-checkbox {
  margin-right: 8px;
}

.el-date-editor {
  .el-input,
  &.el-input__inner {
    width: 100%;
  }
}

.el-form {
  overflow: hidden;
  .el-select {
    width: 100%;
  }
  &.el-form--label-top .el-form-item__label {
    line-height: 30px;
    padding: 0 0 5px;
  }
}

.el-input {
  &__inner {
    padding: 0 10px;
  }
  &__count {
    color: #A3A3A3;
    line-height: 12px;
  }
}
// checkbox选中时颜色不变
.el-checkbox__input.is-checked + .el-checkbox__label {
  color: #1f1f1f;
}
// 多选控件删除按钮背景色不变
.el-select .el-tag__close.el-icon-close{
  background-color: #f4f4f5;
  font-size: 14px;
}
.el-date-editor .el-range-separator{
  color: #a3a3a3;
}

// .el-message{
//   z-index: 3000!important;
// }
